<template>
  <div class="son-page">
    我是子组件-------{{ test }}--------{{ toMoney }}

    <button @click="btnClick">修改toMoney</button>
  </div>
</template>

<script>
export default {
  props: ['test', 'toMoney'],

  methods: {
    btnClick () {
      this.$emit('sonSetMoney', this.toMoney - 1)
    }
  }
}
</script>

<style>
.son-page {
  width: 300px;
  height: 300px;
  background-color: #f00;
}
</style>
